//
//  LTCollectListenViewController.m
//  聆听FM
//
//  Created by dllo on 16/6/6.
//  Copyright © 2016年 Dark. All rights reserved.
//

#import "LTCollectListenViewController.h"
#import "LJLRecommendedVC.h"
#import "LJLSubscribeVC.h"
#import "LJLHistoryVC.h"

@interface LTCollectListenViewController ()

@end

@implementation LTCollectListenViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationController.navigationBar.translucent = NO;
}

- (void)viewDidAppear:(BOOL)animated
{
    self.navigationController.navigationBar.hidden = NO;
}

+ (UINavigationController *)defaultCollectViewUINavigationController {
    static UINavigationController *nav = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
//        LTCollectListenViewController *collectVC = [[LTCollectListenViewController alloc] init];
        LTCollectListenViewController *collectVC = [[LTCollectListenViewController alloc] initWithViewControllerClasses:[self ViewControllerClasses] andTheirTitles:@[@"推荐",@"订阅",@"历史"]];
        //样式:
        collectVC.menuViewStyle = WMMenuViewStyleLine;
        //假导航栏背景颜色:
        collectVC.menuBGColor = [UIColor clearColor];
//        collectVC.menuBGColor = [UIColor colorWithRed:0.96 green:0.96 blue:0.96 alpha:1];
        //假导航栏高度:
        collectVC.menuHeight = 64;
        collectVC.showOnNavigationBar = YES;
        // 设置每个item的宽:
        collectVC.itemsWidths = @[@(SCREENWIDTH/3),@(SCREENWIDTH/3),@(SCREENWIDTH/3)];
        //进度条高度:
        collectVC.progressHeight = 3.5;
        //选中时标题颜色:
        collectVC.titleColorSelected = [UIColor redColor];
        //设置选择时和正常时的标题大小:
        collectVC.titleSizeSelected = 16;
        collectVC.titleSizeNormal = 15;
        //设置初始选中的控制器;
        collectVC.selectIndex = 1;
        collectVC.startDragging = YES;
        collectVC.viewFrame = CGRectMake(0, 0, SCREENWIDTH, SCREENHEIGHT - 64 - 49);
        nav = [[UINavigationController alloc] initWithRootViewController:collectVC];
    });
    return nav;
}

#pragma mark -- 得到发现页的所有页控制器数组
+ (NSArray *)ViewControllerClasses {
    return @[[LJLRecommendedVC class],[LJLSubscribeVC class] ,[LJLHistoryVC class]];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
